#!/bin/bash

#make executable with chmod +rx build

BUILD_DIR=../build
TARG=theory

clear

rm -r $BUILD_DIR

echo calling ghc...

ghc -Wall \
    -fwarn-simple-patterns \
    -fwarn-tabs \
    -fwarn-incomplete-record-updates \
    -fwarn-monomorphism-restriction \
    -o $TARG \
    --make Main.hs \
    -outputdir $BUILD_DIR

mv $TARG $BUILD_DIR

echo calling makeDoc...

./makeDoc

echo running main...

$BUILD_DIR/$TARG

echo done w/build.